package com.bat.client.controller;

import com.bat.feign.TestFeign;
import com.bat.feign.vo.res.TestResVo;
import com.bat.util.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @Description:
 * @Author: zpf
 * @Date: 2019/11/7 下午12:18
 */
@RestController
@Slf4j
public class TestController implements TestFeign {
    @Override
    public R<TestResVo> testFeign() {
        log.info("time={}", new Date().toString());
        return R.s(TestResVo.builder().id(1).name("test").build());
    }

    @GetMapping("/aop")
    public R<TestResVo> aop() {
        log.info("time={}", new Date().toString());
        return R.s(TestResVo.builder().id(1).name("test").build());
    }
}
